import API from './api'
import urlUtil from '../assets/util/urlUtil'

export default {
  getUserInfo (params, callback, errorCallback) {
    var suffix = ''
    if (urlUtil.getUrlKey('flag') == 'detail') {
      suffix = 'detail&liveNo=' + urlUtil.getUrlKey('liveNo')
    } else if (urlUtil.getUrlKey('flag') == 'person') {
      suffix = 'person&liveNo=' + urlUtil.getUrlKey('liveNo')
    } else if(urlUtil.getUrlKey('flag') == 'backVideoDetail'){
      suffix = 'backVideoDetail&liveNo=' + urlUtil.getUrlKey('liveNo')
    }
    API.get('/live/user/getUserInfo?flag=' + suffix, params, callback, errorCallback)
  },
  getUserCitys (params, callback, errorCallback) {
    API.get('/live/user/getUserCitys', params, callback, errorCallback)
  },
  queryAuthEmail (params, callback, errorCallback) {
    API.get('/live/user/queryAuthEmail', params, callback, errorCallback)
  },
  queryUserByInputParam (params, callback, errorCallback) {
    API.get('/live/user/queryUserByInputParam', params, callback, errorCallback)
  },
  getUserInfoByUid (params, callback, errorCallback) {
    API.get('/live/user/getUserInfoByUid', params, callback, errorCallback)
  }
}
